<template>
    <view>
<view class="shengri">
            <view style="color: blue;" @click="guanbi">关闭</view>
            <view>选择时间</view>
            <view style="color: blue;" @click="guanbi">确定</view>
        </view>
        <up-calendar :show="show" :mode="mode" @confirm="confirm"></up-calendar>
        <up-button @click="show = true">打开</up-button>
    </view>
</template>

<script setup lang="ts">
import { ref } from "vue";
const guanbi = () => {
    uni.navigateBack({
        delta: 1
    })
}
const show = ref(true);
const mode = ref('single');
const confirm = (e: any) => {
    show.value = false;
    
}
</script>

<style lang="scss">
#display {
    display: none;

}

.wei {
    display: flex;
    height: 40px;
    line-height: 40px;
    justify-content: space-between;
    padding: 10px 10px;
    border-bottom: 1px solid #ccc;
}

.shengri {
    display: flex;
    margin-top: 50px;
    justify-content: space-between;
    padding: 10px 10px;
    border-bottom: 1px solid #ccc;
}
</style>